<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="zh">
<head>
<%@include file="../../commons/meta.jsp"%>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<c:set var="baseUrl" value="${ctx}api/expertinfo/" scope="request" />
<c:set var="dicUrl" value="${ctx}api/dic/" scope="request" />

<link rel="stylesheet" href="${ctx}assets/plugins/pure/pure-min.css"
	media="all" />
<script type="text/javascript"
	src="${ctx}assets/plugins/plupload/2.2.1/js/plupload.full.min.js"></script>
<script type="text/javascript"
	src="${ctx}assets/plugins/plupload/2.2.1/js/i18n/zh_CN.js"></script>

<script type="text/javascript">
    function validateForm() {

        if (empty($("#name").val())) {
            alertError("请输入姓名");
            return false;
        }
        if (empty($("#serviceWay").val())) {
            alertError("请输入服务方式");
            return false;
        }
        if (empty($("#serviceObject").val())) {
            alertError("请输入服务对象");
            return false;
        }
        if (empty($("#description").val())) {
            alertError("请输入描述");
            return false;
        }

        if (empty($("#phoneNumber").val())) {
            alertError("请输入联系电话");
            return false;
        }
        if (empty($("#expertType").val())) {
            alertError("请输入专家类型");
            return false;
        }
        $("#forms").submit();
    };

    function back() {
        window.location.href = "${baseUrl}";
    }
</script>
</head>
<body>
	<%@include file="../../commons/head.jsp"%>
	<div class="content">
		<%@include file="../../commons/menu.jsp"%>
		<!--右侧展示部分-->
		<div class="right-zq">
			<!--center content-->
			<div class="dynamic">
				<form class="" id="forms" method="post" action="${baseUrl}update">
					<div class="role dynamiclayer" style="display: block;">
						<div class="title orange2">
							<span class="left">专家信息管理</span> <label> > </label> <span>编辑专家信息</span>
						</div>
						<div class="news-table">
							<table>
								<tr>
									<td><input class="p100" id="id" name="id" type="hidden"
										value="${obj.id}" /></td>
								</tr>
								<tr>
									<td class="item">姓名:</td>
									<td width="40%"><input class="p100" id="name" name="name"
										type="text" placeholder="请输入姓名" value="${obj.name}" /></td>
								</tr>
								<tr>
									<td class="item">别名:</td>
									<td width="40%"><input class="p100" id="alais"
										name="alais" type="text" placeholder="请输入别名"
										value="${obj.alais}" /></td>
								</tr>
								<tr>
									<td class="item">专家简介:</td>
									<td width="60%"><textarea class="p100" id="brief"
											name="brief" placeholder="请输入专家简介" rows="4">${obj.brief}</textarea>
									</td>
								</tr>
								<tr>
									<td class="item">服务方式:</td>
									<td width="40%"><input class="p100" id="serviceWay"
										name="serviceWay" type="text" placeholder="请输入服务方式"
										value="${obj.serviceWay}" /></td>
								</tr>
								<tr>
									<td class="item">服务对象:</td>
									<td width="40%"><input class="p100" id="serviceObject"
										name="serviceObject" type="text" placeholder="请输入服务对象"
										value="${obj.serviceObject}" /></td>
								</tr>
								<tr>
									<td class="item">服务地区:</td>
									<td width="40%"><input class="p100" id="serviceArea"
										name="serviceArea" type="text" placeholder="请输入服务地区"
										value="${obj.serviceArea}" /></td>
								</tr>
								<tr>
									<td class="item">价格:</td>
									<td width="40%"><input class="p100" id="price"
										name="price" type="text" placeholder="请输入价格(元)"
										value="${obj.price}" /></td>
								</tr>
								<tr>
									<td class="item">联系电话:</td>
									<td width="40%"><input class="p100" id="phoneNumber"
										name="phoneNumber" type="text" placeholder="联系电话"
										value="${obj.phoneNumber}" /></td>
								</tr>
								<tr>
									<td class="item">描述:</td>
									<td width="60%"><textarea class="p100" id="description"
											name="description" placeholder="请输入描述" rows="4">${obj.description}</textarea>
									</td>
								</tr>
								<tr>
									<td class="item">类型:</td>
									<td width="40%"><input class="p100" id="expertType"
										name="expertType" type="text" placeholder="1: 专家一对一 2:合作伙伴"
										value="${obj.expertType}" /></td>
								</tr>
								<tr>
									<td></td>
									<td>
										<button class="orange2" type="button" onclick="validateForm()">
											保存&nbsp;<i class="fa fa-floppy-o"></i>
										</button> &nbsp;&nbsp;
										<button class="orange2" type="button" id="back_btn"
											onclick="back()">
											返回&nbsp;<i class="fa fa-undo"></i>
										</button>
									</td>
								</tr>
							</table>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
	<%@include file="../../commons/footpop.jsp"%>
    <!-- 页尾，提示消息 -->
    <jsp:include page="../../commons/foot_message.jsp"></jsp:include>
</body>
</html>